package com.hgsoft.yfzx.component.filehelper.entity;

import java.io.File;
import java.io.Serializable;

/**
 * @author RuiHaoZ on hgits.cn
 * @date 2019/1/21 11:44
 */
public class FileUploadFile implements Serializable {
    private static final long serialVersionUID = 1L;

    public FileUploadFile(String filePath) {
        File file = new File(filePath);
        String fileMd5 = file.getName();
        this.setFile(file);
        this.setFile_md5(fileMd5);
        this.setStarPos(0);
    }

    /**
     * 文件
     */
    private File file;
    /**
     * 文件名
     */
    private String file_md5;
    //
    /**
     * 开始位置
     */
    private int starPos;
    //
    /**
     * 文件字节数组
     */
    private byte[] bytes;
    /**
     * 结尾位置
     */
    private int endPos;

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public String getFile_md5() {
        return file_md5;
    }

    public void setFile_md5(String file_md5) {
        this.file_md5 = file_md5;
    }

    public int getStarPos() {
        return starPos;
    }

    public void setStarPos(int starPos) {
        this.starPos = starPos;
    }

    public byte[] getBytes() {
        return bytes;
    }

    public void setBytes(byte[] bytes) {
        this.bytes = bytes;
    }

    public int getEndPos() {
        return endPos;
    }

    public void setEndPos(int endPos) {
        this.endPos = endPos;
    }

    public static long getSerialversionuid() {
        return serialVersionUID;
    }
}
